<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of admin
 *
 * @author Andi
 */
include_once("database.php");

class admin extends database {
    //put your code here

    function  __construct() {
        $this->connect();
    }


    function blockUser($user_name){
        $sql = "UPDATE user SET access_login = 'no' WHERE user_name = '$user_name'";
        mysql_query($sql);
    }

    function unBlockUser($user_name){
        $sql = "UPDATE user SET access_login = 'yes' WHERE user_name = '$user_name'";
        mysql_query($sql);
    }

    function resetPassword($user_name){
        $this->update('user', 'user_name', $user_name, 'password', 'password');
    }

    function deletePhoto($photo_id){
        $this->delete('photo', 'photo_id', $photo_id);
    }


}
?>
